cc.Class({
    extends: cc.Component,

    properties: {
        bullet:{
            default:null,
            type:cc.Prefab
        },
        _arr:[],
        _node:[],
    },
    // use this for initialization
    onLoad: function () {
        
    },
    start:function(){
        // var delay = 2;
        // this.schedule(function() {
        //     for(var i=0;i<this.number;i++){          
        //         this._node[i]=cc.instantiate(this.sprite);
        //         this.node.addChild(this._node[i]);
        //     }
        // }, delay);
    },

    // called every frame, uncomment this function to activate update callback
    update: function (dt) {       
        var node=cc.instantiate(this.bullet);
        node.getComponent('bullet').angle=Math.random()*Math.PI*2;
        this.node.addChild(node);
    },

    onDestroy:function(){

    }
});
